#ifndef DATABASE_H
#define DATABASE_H
#include <QThread>
#include <iostream>
#include <QWaitCondition>
#include <QMutex>
#include <QMutexLocker>
#include "funtool.h"

class funtool;

class DatebaseThread : public QThread
{
	Q_OBJECT
public:
	DatebaseThread(QString sn_Value,QString imei_Value,int result,QString title,QString address,QString uid,QString pwd,QString dbname,QMap<QString,int> setp_map,bool connect,funtool *f);
	void stop();
	void run();
    void setSn_Value(QString msn_Value);
	void setImei_Value(QString mimei_Value);
	void setResult(int mresult);
	void setAddress(QString maddress);
	void setUid(QString muid);
	void setPwd(QString mpwd);
	void setDbname(QString mdbname);
	void setSetp_map(QMap<QString,int> msetp_map);
	void setConnect(bool mconnect);
	void setTitle(QString mtitle);

private:
	QString msn_Value;
	QString mimei_Value;
	QString mtitle;
	int mresult;
	QString maddress;
	QString muid;
	QString mpwd;
	QString mdbname;
	QMap<QString,int> msetp_map;
	funtool *pFuntool;
	bool mconnect;
	bool stopped;

public:signals:  
    void  mybox(QString par); 

};
#endif 